/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.service;

import java.util.List;
import java.util.Map;

import com.jeesite.modules.st.entity.StMaterialType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.st.entity.StMaterialRecord;
import com.jeesite.modules.st.dao.StMaterialRecordDao;

/**
 * 物料档案Service
 *
 * @author HOHD
 * @version 2020-12-16
 */
@Service
@Transactional(readOnly = true)
public class StMaterialRecordService extends CrudService<StMaterialRecordDao, StMaterialRecord> {

    /**
     * 获取单条数据
     *
     * @param stMaterialRecord
     * @return
     */
    @Override
    public StMaterialRecord get(StMaterialRecord stMaterialRecord) {
        return super.get(stMaterialRecord);
    }

    /**
     * 查询分页数据
     *
     * @param stMaterialRecord 查询条件
     * @return
     */
    @Override
    public Page<StMaterialRecord> findPage(StMaterialRecord stMaterialRecord) {
        return super.findPage(stMaterialRecord);
    }

    public List<StMaterialRecord> findAll(Map<String, Object> map) {
        return dao.findAll(map);
    }

    public List<StMaterialRecord> findMP(StMaterialRecord stMaterialRecord) {
        return dao.findMP(stMaterialRecord);
    }


    /**
     * 保存数据（插入或更新）
     *
     * @param stMaterialRecord
     */
    @Override
    @Transactional(readOnly = false)
    public void save(StMaterialRecord stMaterialRecord) {
        super.save(stMaterialRecord);
    }

    /**
     * 更新状态
     *
     * @param stMaterialRecord
     */
    @Override
    @Transactional(readOnly = false)
    public void updateStatus(StMaterialRecord stMaterialRecord) {
        super.updateStatus(stMaterialRecord);
    }

    /**
     * 删除数据
     *
     * @param stMaterialRecord
     */
    @Override
    @Transactional(readOnly = false)
    public void delete(StMaterialRecord stMaterialRecord) {
        super.delete(stMaterialRecord);
    }

}